<template>
  <div>
    <el-button @click="sendNotification">发送系统通知</el-button>
  </div>
</template>

<script>
export default {
  name: 'Notification',
  methods: {
    sendNotification () {
      const myNotification = new Notification('标题', {
        body: '通知正文内容'
      })
      myNotification.onclick = () => {
        console.log('通知被点击')
      }
    }
  }
}
</script>
